package ttOrder.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import ttOrder.dao.FoodTypeDAOImpl;
import ttOrder.model.Foodtype;

@Service
@Transactional
public class FoodTypeServiceImpl implements IFoodTypeService {
	@Autowired
	private FoodTypeDAOImpl foodTypeDAO;

	@Override
	public List<Foodtype> findAllFoodtype() {
		return foodTypeDAO.findAllFoodtype();
	}

	@Override
	public Integer deleteFoodtype(Integer id) throws Exception {
		// TODO Auto-generated method stub
		return foodTypeDAO.deleteFoodtype(id);
	}

	@Override
	public void editFoodtype(Foodtype foodtype) throws Exception {
		// TODO Auto-generated method stub
		foodTypeDAO.editFoodtype(foodtype);
	}

	@Override
	public void createFoodtype(Foodtype foodtype) throws Exception {
		// TODO Auto-generated method stub
		foodTypeDAO.createFoodtype(foodtype);
	}

	@Override
	public Foodtype getFoodtypeById(Integer id) {
		// TODO Auto-generated method stub
		return foodTypeDAO.getFoodtypeById(id);
	}

}
